package com.xiaozhen.rtmp.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;

/**
 * camera相机
 *
 * @author ZJ
 */
@Getter
@Setter
@TableName("parse_camera")
public class Camera implements Serializable {
    /**
     *
     */
    private static final long serialVersionUID = -5575352151805386129L;

    @TableId
    private Long id;

    @ApiModelProperty("rtsp、rtmp、d:/flv/test.mp4、desktop")
    private String url;

    @ApiModelProperty("流备注")
    private String remark;

    @ApiModelProperty("flv开启状态")
    private Boolean flv;

    @ApiModelProperty("hls开启状态")
    private Boolean hls;

    @ApiModelProperty("是否启用ffmpeg，启用ffmpeg则不用javacv")
    private Boolean ffmpeg;

    @ApiModelProperty("无人拉流观看是否自动关闭流")
    private Boolean autoClose;

    @ApiModelProperty("0网络流，1本地视频")
    private int type = 0;

    @ApiModelProperty("md5 key，媒体标识，区分不同媒体")
    private String mediaKey;

    @TableField(exist = false)
    @ApiModelProperty("网络超时 ffmpeg默认5秒，这里设置15秒")
    private String netTimeout = "15000000";

    @TableField(exist = false)
    @ApiModelProperty("读写超时，默认5秒")
    private String readOrWriteTimeout = "15000000";

    @TableField(exist = false)
    @ApiModelProperty("无人拉流观看持续多久自动关闭，默认1分钟")
    private long noClientsDuration = 60000;

}
